package MODELS;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;

import ModelEntityFW.UserEntitys;

public abstract class BaseModels<T> {
    // 1. Datafield
    protected Connection m_objConnection;
    protected UserEntitys m_objSecurityContext;
    protected CallableStatement m_objCmst = null;
    protected ResultSet m_objRs = null;

    public BaseModels(Connection objConnection, UserEntitys objSecurity) {
        m_objConnection = objConnection;
        m_objSecurityContext = objSecurity;
    }

    public abstract ResultSet GetElements() throws Exception;

    public abstract ResultSet GetElementById(T obj) throws Exception;

    public abstract void CheckElement(T obj) throws Exception;

    public abstract boolean InsertElement(T obj) throws Exception;

    public abstract boolean UpdateElement(T obj) throws Exception;

    public abstract boolean DeleteElement(T obj) throws Exception;

    public abstract boolean FindElement(T obj) throws Exception;
}
